const routes = [
  {
    path: "/BlogWrite/:id?",
    name: "BlogWrite",
    // component: () => import("@/view/blog/BlogWrite"),
    component: (r) =>
      require.ensure(
        [],
        () => r(require("@/view/blog/BlogWrite")),
        "BlogWrite"
      ),
    meta: {
      requireLogin: true,
    },
  },
  {
    path: "/",
    name: "MainContent",
    component: () => import("@/view/MainContent.vue"),
    children: [
      {
        path: "/homePage",
        name: "HomePage",
        meta: {
          title: "首页",
        },
        component: () => import("@/view/homePage.vue"),
        children: [
          // path:"/"
        ],
      },
      {
        path: "/categorySort",
        name: "CategorySort",
        meta: {
          title: "文章分类",
        },
        component: () => import("@/view/categorySort.vue"),
      },
      {
        path: "/myTag",
        name: "myTag",
        meta: {
          title: "标签",
        },
        component: () => import("@/view/myTag.vue"),
      },
      {
        path: "/myArchives",
        name: "myArchives",
        meta: {
          title: "文章归档",
        },
        component: () => import("@/view/myArchives.vue"),
      },
      {
        path: "/myLog",
        name: "MyLog",
        meta: {
          title: "日志",
        },
        component: () => import("@/view/myLog.vue"),
      },
      {
        path: "/myMessageBoard",
        name: "myMessageBoard",
        meta: {
          title: "留言板",
        },
        component: () => import("@/view/myMessageBoard.vue"),
      },
    ],
  },
  // 登录
  {
    path: "/MyLogin",
    name: "MyLogin",
    component: () => import("@/view/MyLogin.vue"),
  },
  // 注册
  {
    path: "/MyLogon",
    name: "MyLogon",
    component: () => import("@/view/MyLogon.vue"),
  },
];

export { routes };
